﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;

namespace Apq_DBTools.Forms
{
	public class ContextCompare
	{
		protected int _Step = 0;
		/// <summary>
		/// 获取或设置当前进度(默认0,第1步为1)
		/// </summary>
		[DefaultValue(0)]
		public int Step
		{
			get { return _Step; }
			set { _Step = value; }
		}

		protected List<StepContext> _Steps = new List<StepContext>();
		/// <summary>
		/// 获取步骤列表
		/// </summary>
		public List<StepContext> Steps
		{
			get { return _Steps; }
		}

		#region StepContext
		/// <summary>
		/// 第1步:数据库连接设置
		/// </summary>
		public class StepContext
		{
			protected ContextCompare _context = null;
			public StepContext(ContextCompare context)
			{
				_context = context;
			}

			protected bool _NeedRecalcForwad = true;
			public virtual bool NeedRecalcForwad
			{
				get { return _NeedRecalcForwad; }
				set { _NeedRecalcForwad = value; }
			}
			protected bool _NeedRecalcBack = true;
			public virtual bool NeedRecalcBack
			{
				get { return _NeedRecalcBack; }
				set { _NeedRecalcBack = value; }
			}

			public virtual void CalcNext()
			{
				if (NeedRecalcForwad)
				{
				}
			}
		}
		#endregion
	}
}
